package com.zmn.mcc.business.interfaces.organize;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.mcc.common.constant.DpermitConsts;
import com.zmn.mcc.common.dto.organize.OrganizeDRO;
import com.zmn.mcc.model.entity.organize.McOrganize;
import com.zmn.mcc.model.entity.organize.McOrganizeQuery;

import java.util.List;

/**
 * @author heguanghua
 * @since 2020/04/14 21:55
 */
public interface OrganizeBService {

    /**
     * 根据主键取得组织架构
     *
     * @param orgId
     * @return
     */
    OrganizeDRO getByKey(Integer orgId);

    /**
     * 取得组织架构列表
     *
     * @param query
     * @param
     * @return
     */
    List<McOrganize> listOrganize(McOrganizeQuery query);

    /**
     * 取得组织架构列表
     *
     * @param plat 平台标识，即一级组织架构ID
     * @param level  返回的层级，0或null表示不限， {@link DpermitConsts#ORGANIZE_LEVEL_PLAT}
     * @param status
     * @return
     */
    List<McOrganize> listByPlatAndLevel(Integer plat, Integer level, Integer status);

    /**
     * 取得组织架构列表
     *
     * @param plats 平台标识，即一级组织架构ID
     * @param level  返回的层级，0或null表示不限， {@link DpermitConsts#ORGANIZE_LEVEL_PLAT}
     * @param status
     * @param parentIdList 父节点ID集合
     * @return
     */
    List<McOrganize> listByPlatsAndLevelAndParentIds(List<Integer> plats, Integer level, Integer status, List<Integer> parentIdList);

    /**
     * 新增组织架构
     *
     * @param organize
     * @return
     */
    ResponseDTO addOrganize(McOrganize organize);

    /**
     * 修改组织架构
     *
     * @param organize
     * @return
     */
    ResponseDTO modifyOrganize(McOrganize organize);


}
